package com.gomefinance;

import java.util.Calendar;
import java.util.Date;

/**
 * Created by Administrator on 2017/3/27.
 */
class QuequeListenerTest2 {
   public static void main(String[] args){
       System.out.println(getBeforeDay(new Date()));
   }

    public static Date getBeforeDay(Date date) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        calendar.add(Calendar.DAY_OF_MONTH, -1);
        date = calendar.getTime();
        return date;
    }
}